package com.alfred.springboot.ymlconfig.controller;

import com.alfred.springboot.ymlconfig.bean.Person;
import com.alfred.springboot.ymlconfig.bean.Person3;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: alfred
 * @date: 2021/7/19
 * @description: 测试接口
 */
@RestController
@EnableConfigurationProperties(Person3.class)
public class TestController {

    @Autowired
    private List<Person> persons;

    @GetMapping("/say")
    public String say(){
        return persons.toString();
    }

}
